/*
 * Object.h
 *
 *  Created on: 2012-5-17
 *      Author: esf
 */

#ifndef OBJECT_H_
#define OBJECT_H_
#include <string>
#define interface class
#define extends virtual public
#define implements public virtual
#define null true
namespace collection {

}
typedef char byte;

class Object {

protected:

public:
	bool isNull;
	void createFrom(Object&o) {
		this->isNull = o.isNull;
	}
	Object() {
		isNull = false;
	}
	Object(Object&o) {
		this->isNull = o.isNull;
	}
	Object(bool b) {
		this->isNull = b;
	}
	virtual bool equals(Object& o);

	virtual std::string toString();
	virtual int hashCode();
	bool operator ==(Object* o) {
		return this == o;
	}
	bool operator ==(Object& o) {
		return (int) this - (int) (&o);
	}
	bool operator ==(bool b) {
		return this->isNull == b;
	}
	virtual Object operator =(Object o) {
		return o;
	}

	virtual ~Object() {

	}
};
#endif
